package com.richinfo.stream.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.integration.annotation.ServiceActivator;

/**
 * 消息消费者
 * Spring Integration原生支持
 * 
* Created by WangXJ
* 2018-11-27 10:55
*/
@EnableBinding(value = {Sink.class})
public class SinkReceiver {

	private static Logger logger = LoggerFactory.getLogger(SinkReceiver.class);
	
	@ServiceActivator(inputChannel = Sink.INPUT)
	public void receive(Object payload) {
		logger.info("Received : " +payload);
	}
	
}
